package com.shuyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shuyu.domain.ActivityProductTmp;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ActivityProductTmpMapper extends BaseMapper<ActivityProductTmp> {
    @Select("select t1.*,t2.type,t2.name as product_name,t2.price  " +
            "from tbl_activity_product_tmp t1 " +
            "left join tbl_product t2 on t1.product_id = t2.id " +
            "where t1.activity_id = #{activityId}")
    List<ActivityProductTmp> getProductListByActivityId(Integer activityId);
}
